package com.qkl.xiatang.app.dto.wvp;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.HashMap;
import java.util.Map;

@Data
public class PlayBackSpeedDTO implements IPlayBack{

    private String streamId;

    /**
     * 倍速0.25 0.5 1、2、4
     */
    private Double speed;

    public Map<String,Object> toParams(){
        Map<String,Object> map = new HashMap<>();
        map.put("streamId", StringUtils.trimToEmpty(streamId));
        if(null != speed){
            map.put("speed", speed);
        }
        return map;
    }

}
